<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.turing.selfwebservice.common.Toolkit"%>
<%@page import="com.turing.selfwebservice.util.ServletUtil"%>
<%@page import="com.turing.post.webservice.client.MchTradDetail"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>" />
		<title>商户交易流水</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link href="<%=path %>/css/c.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="<%=path %>/js/jquery.js">
</script>
		<script type="text/javascript" src="<%=path %>/js/WdatePicker.js">
</script>
		<script type="text/javascript" src="<%=path %>/js/common.js">
</script>
	</head>
	<%
		List<MchTradDetail> mchTradDetails = (List<MchTradDetail>) request
				.getAttribute("mchTradDetails");
		String currentSAN = request.getParameter("subAccountNo");
		String startTime = request.getParameter("startTime");
		if (ServletUtil.isEmpty(startTime)) {
			startTime = Toolkit.dateTostring();
		}
		String endTime = request.getParameter("endTime");
		if (ServletUtil.isEmpty(endTime)) {
			endTime = Toolkit.dateTostring();
		}
	%>
	<body class="body">
		<div id="searchForm">
			<form
				action="<%=basePath%>merchantOperServlet.do?method=MerchantTradDetails"
				method="post">
				<table class="infoTable noAutoClass">
					<tr>
						<td width="23%" align="center" scope="col">
							终端号:
							<input type="text" name="terminalNo" id="terminalNo"
								style="width: 120px;" />
						</td>
						<td width="28%" align="center" scope="col">
							交易时间范围:
							<input id="htStart" type="text" style="width: 80px;"
								value="<%=startTime%>" name="startTime" readonly="readonly"
								onfocus="new WdatePicker(this,'%Y-%M-%D',false)"
								MAXDATE="$htEnd" />
							<input id="htEnd" type="text" style="width: 80px;" name="endTime"
								value="<%=endTime%>" readonly="readonly"
								onfocus="new WdatePicker(this,'%Y-%M-%D',false)"
								MINDATE="$htStart" MAXDATE="2020-1-1" />
						</td>
						<td width="29%" align="center" scope="col">
							交易金额范围:
							<input type="text" name="startAmount" id="startAmount"
								style="width: 80px;" />
							<input type="text" name="endAmount" id="endAmount"
								style="width: 80px;" />
						</td>
						<td width="6%" align="right">
							<input type="submit" value="查询" />
						</td>
					</tr>
				</table>
			</form>
		</div>
		<%
			if (null != mchTradDetails) {
		%>
		<table class="infoTable noAutoClass" style="margin-top: 12px;">
			<tr class="tableTitle">
				<td width="10%">
					交易时间
				</td>
				<td width="7%">
					交易金额
				</td>
				<td width="8%">
					交易码
				</td>
				<td width="10%">
					账户日期
				</td>
				<td width="8%">
					流水号
				</td>
				<td width="11%">
					商户请求流水
				</td>
				<td width="11%">
					卡号
				</td>
				<td width="19%">
					商户分支机构号
				</td>
				<td width="10%">
					终端号
				</td>
				<td width="6%">
					详细
				</td>
			</tr>
			<%
				if (mchTradDetails.size() > 0) {
						for (MchTradDetail d : mchTradDetails) {
			%>
			<tr class="tableTitle">
				<td>
				</td>
				<td align="right">&nbsp;
					



				</td>
				<td>&nbsp;
					



				</td>
				<td>&nbsp;
					



				</td>
				<td>&nbsp;
					



				</td>
				<td>&nbsp;
					



				</td>
				<td>&nbsp;
					



				</td>
				<td>&nbsp;
					



				</td>
				<td>&nbsp;
					



				</td>
				<td>&nbsp;
					



				</td>
			</tr>
			<%
				}
			%>
			<tr>
				<td colspan="10"><%@ include file="/common/pageControl.jsp"%>
				</td>
			</tr>
			<%
				} else {
			%>
			<tr>
				<td colspan="10">
					无交易数据
				</td>
			</tr>
			<%
				}
			%>
		</table>
		<%
			}
		%>
	</body>
</html>
